define(["jquery", "app/user", "text!view/user.html"], function(
  $,
  user,
  template
) {
  return {
    getUser: function() {
      var def = $.Deferred();
      def.resolve(user);
      return def;
    },

    getUserByJsonp: function() {
      $.ajax({
        url: "https://randomuser.me/api/?results=5",
        dataType: "jsonp",
        jsonpCallback: "randomuserdata",
        success: function(data) {
          console.log(data);
        }
      });
    },

    loadText: function() {
      $(".text-center").append(template);
    }
  };
});
